<template>
  <div id="landing-page">
    <div class="c-wrapper" v-for="item in pItems"  v-bind:key="item.position">
      <component class="text-item" :is="item.type" :item="item" @click="doItemSelect(item)" v-on:select="doItemSelect"></component>
    </div>
  </div>
</template>
<style lang='scss'>
#landing-page {
  position: initial;
}

.text-item {
  position: absolute;
  box-sizing: border-box;
}
</style>

<script>
export default {
  name: 'landing-page',
  props: ['pItems'],
  data () {
    return {
    }
  },
  methods: {
    doItemSelect: function (i) {
      this.$emit('select', i)
    }
  }
}
</script>
